﻿/**************************************************************
 * Description:
 * DeliveryUIBListUIModelAction.cs
 * Product: U9
 * Co.    : UFIDA Group
 * Author : Auto Generated
 * version: 2.0
 **************************************************************/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UFSoft.UBF.Util.Log;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.ActionProcess;
using UFSoft.UBF.UI.IView; 
using System.Data;
using UFIDA.UBF.Query.CommonService;
using UFSoft.UBF.UI.FormProcess;
using UFSoft.UBF.UI.ControlModel;
using UFIDA.UBF.Query.CommonService.QueryStrategy;
using UFIDA.UBF.Query.CaseModel;
using UFIDA.U9.UI.PDHelper;
using UFSoft.UBF.ExportService;

namespace UFIDA.U9.Cust.U9Demo.DeliveryListUI
{
	public partial class DeliveryUIBListUIModelAction : BaseAction
	{
		private static readonly ILogger logger = LoggerManager.GetLogger(typeof(DeliveryUIBListUIModelAction));
		//强类型化基类Model属性.
		public new DeliveryUIBListUIModelModel CurrentModel 
		{
			get {
				return (DeliveryUIBListUIModelModel)base.CurrentModel;
			}
			set {
				base.CurrentModel = value ;
			}
		}
		
		public DeliveryUIBListUIModelAction(IPart part) : base(part)
		{
		}
		//Model参数的构造,用于测试用例.
		public DeliveryUIBListUIModelAction(DeliveryUIBListUIModelModel model) : base(model)
		{
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnLookCase(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnLookCase_Extend);
		}
		private void OnLookCase_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:QryClick
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("QryClick",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnCaseChanged(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnCaseChanged_Extend);
		}
		private void OnCaseChanged_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	        QryService.OnCaseChangedDefault("DDLCase", this.CurrentPart);
		QueryAdjust();
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnOutPut(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnOutPut_Extend);
		}
		private void OnOutPut_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:OnOutPut
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("OnOutPut",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnGridRowDbClick(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnGridRowDbClick_Extend);
		}
		private void OnGridRowDbClick_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnNew(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnNew_Extend);
		}
		private void OnNew_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnPrint(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnPrint_Extend);
		}
		private void OnPrint_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:OnPrint
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("OnPrint",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnDelete(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnDelete_Extend);
		}
		private void OnDelete_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:ListDeleteClick
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("ListDeleteClick",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnSaveCase(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnSaveCase_Extend);
		}
		private void OnSaveCase_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 

		}
		#region Action的内置两个Action.
		/// <summary>
		/// Help: 数据加载(发生在Form的初始化加载时)
		/// </summary>
		public void OnLoadData(object sender, UIActionEventArgs e)
		{
			//UBF扩展处...
			this.OnLoadData_Extend(sender,e) ;
		}
		private void OnLoadData_DefaultImpl(object sender, UIActionEventArgs e)
		{
		   
		     InitCaseModel();
				}
		/// <summary>
		/// Help: 数据收集(发生在Form的CallBack或者是PostBack时)
		/// </summary>
		public void OnDataCollect(object sender, UIActionEventArgs e)
		{
			//UBF扩展处...
			this.OnDataCollect_Extend(sender,e) ;
		}
		private void OnDataCollect_DefaultImpl(object sender, UIActionEventArgs e)
		{
		    UFIDA.U9.UI.Commands.CommandFactory.DoCommand("DataCollect",this,sender,e);
		}
		#endregion
         

            
        #region BE列表自动产生的代码
        
		public void QueryAdjust()
		{
			IUFDataGrid UIGrid = this.CurrentPart.GetUFControlByName(this.CurrentPart.TopLevelContainer, "DataGrid1") as IUFDataGrid;

			BEQueryStrategyImpl beQryStrategyImpl = new BEQueryStrategyImpl(this.CurrentState, "UFIDA.U9.Cust.U9Demo.DeliverBE.Delivery", "896e52ca-0034-42ae-a603-d9b8c334f4c5", UIGrid.UIView, UIGrid, 1);

			beQryStrategyImpl.Adjust();
		    
			AfterQryAdjust_Extend(UIGrid);

			UIGrid.UIView.CurrentFilter.OPath = CustomFilterOpath_Extend(QryService.GetDefaultOpath((BaseWebForm)(this.CurrentPart)));
			UIGrid.UIView.CurrentFilter.OrderBy = QryService.GetOrderByOpath((BaseWebForm)(this.CurrentPart));

			UIGrid.UIView.Clear();
			this.NavigateAction.FirstPage(null);

			//20090316 UBF2.9_查询_yzx_修改查询设计器的tpl_用于显示多webpart查询的IE状态栏提示信息
			QryService.ShowQueryInfoInIEStatusBar((BaseWebForm)this.CurrentPart, UIGrid.UIView);
		}

		public void InitCaseModel()
		{
			QryService.ClearSession((UFSoft.UBF.UI.FormProcess.BaseWebForm)(this.CurrentPart));
			IUFDataGrid UIGrid = this.CurrentPart.GetUFControlByName(this.CurrentPart.TopLevelContainer, "DataGrid1") as IUFDataGrid;
			BEQueryStrategyImpl beQryStrategyImpl = new BEQueryStrategyImpl(this.CurrentState, "UFIDA.U9.Cust.U9Demo.DeliverBE.Delivery", "896e52ca-0034-42ae-a603-d9b8c334f4c5", UIGrid.UIView, UIGrid, 1);
			beQryStrategyImpl.QueryComponentXMLCompressed = @"7VbNbhxFEDYXLtw5r/bedv9PtxQnsndjaaWQOLEdzv1TbQ8Z76xmZhP7BhcOkSIuBCRAAg5cOQJC
iFfgJbDzGFCzsxvsdRwZyRIc3Jfuqu7qr/rrqupeeWdlZeUvbG3ftnfbwR/v37pzdFj0nkJV5+V4
vc9Wab8H41DGfLy/3p82iZj+ndu3Hk6hOh6Uh5NyDOOml8f1fhLCKM40Ae8FkTJx4jg1RBjGLDhD
E/X93tgdwnp/CEWOGMcPq+N+L+b1pHDH998wA3Wo8kkzc6XfO4Bi0vYz8N3jCS6/l9fNXLH3aLTe
N1aD4sERSoUkkjsgTlNBovUmCCGTDGq+fqecVgG2pkXRIe9tjYYbq3t2dTCtG+yHcFiuzt3ZvLsY
oVd7o8c5PBtWbr/zoR0Ny2fjfu8RpNE4lfdKF7upgQsH0L99a9PVeWinZkxpBVFrdI37kIikVhJn
tSHKofNScGUgLZhaoudSThB6t3wCM92jsmyGuGxQjhs4ah67Yjoz3cqLBqpd5x/nde4L1O1WU+j3
BmUxPRxf1O+UVXNR2+1y92jixvEePIVivS8Weyxr2x2WdWtIx/acqRkdXlJpIVNEceuIDEESn4mM
GAVca8+idv7f0rFdlR9BaEbDM8K2aw5acXN71MBhN7W5/WAClWvNO8Vw98FiZmMfQ3tYFGck3Ono
uJXxEHujs4dgSSYtnCcUo51InQHxihsSZGJGaZ4YZ9d5iL3RB2WEYnESriS4qAyxXCiCueeJcZwT
lQnrlUncCdoabZXV4cImCuG9EUAyp9Am44FY7zPCvNC4Hi2T/QcIDYQ34ByVhMmoMW51JJ5nnnDN
MxeNYTRzM2q6EBlCysdQnxdnZFkM/JBCIBngblJqTtCTQKRyUktHrbDydakow/1yuUjMdZfQ5iq8
qgW3G0Xu6tcmo3orPwJ0YcsVNbTyRlGUzzYLN36yCPCleG8zaSuHIr45ne4jO12yt7zictfAsHO2
U2M+uryGwYEb70O8+xR9OwO/Oc2L+OEBVLDTVAvILibLqq1u82i7wCGjgUslIslsRolkShCrfCI8
UK4dC5aJbMHh5rRub6JufVuicmnqXzB63vI/ILYDvg5y15YCFgduWjQDV8O8dncL6nPS7BqiwFyn
lhFFPeaEMpFY5gRJhukAwTDPzdtC+eTFy9MXP7767YuTz36+lP+1i7jGpMAciyQGZ4g0NsNclIJ4
k6JOXDGh6RWu/89fvjp5/v3plz+cfvPt2+DXzrOwIGhW9FHuBjPHuLYh6IjVXCZovwGO+GADMYIn
KQ1zmYbrIOQMpKWSaUDmEwfkIkogNuJTIpIBLElaCqOvkYszyN4zASxSInhEZM0pItNEktA6maiC
BbFA3mlcM62XMF89/+n040+ues5oE5VGExWox1hTlljwhoBiibrAaDT2Ndp0MilyqFYHmEbLB/39
65NfPz95+Smy/Oq7q6JTZRwNGGLRcIz0IPC5wCqD6DHYhA+HZHABvQW8DP2t8bYcYXO5/VCg1HYz
p5xijjNqSfIRP534sSImYRUEq6nCVxCvIVzh6i91ZfYF6qrN3Z3BOdfmrqydKxZr5z/Gt99buWk3
7abdtP9Z+xs=";
		    
			BeforeGetQryModel_Extend(beQryStrategyImpl);
		    
			CaseModel caseModel = beQryStrategyImpl.GetQryModel();
		    
			AfterGetQueryModel_Extend(caseModel);
		    
			QryService.SetCaseModelToSession((BaseWebForm)(this.CurrentPart), caseModel);
		}
        
        
         #endregion
         

	}
}
